package org.example.memora.service;

import jakarta.servlet.http.HttpSession;
import org.example.memora.DTO.UserDTO;
import org.example.memora.DTO.UserLoginDTO;
import org.example.memora.common.result.Result;
import org.example.memora.entity.User;

import java.util.List;

public interface UserService {

    // 获取所有用户
    List<User> getAllUsers();

    // 根据 ID 获取用户
    User getUserById(Long id);

    // 创建新用户
    Result<?> createUser(UserDTO userDTO);

    // 更新用户信息
    Result<?> updateUser(Long id, UserDTO userDTO);

    // 删除用户
    Result<?> deleteUser(Long id);

    Result<?> logout();

    Result<?> login(UserLoginDTO requestBody);
    User getUserByUsername(String username);
    User getUserByPhone(String phone);
    User getUserByEmail(String email);

    Result<?> sendCode(String phone);
}
